<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>伪类选择器</title>
    <style>
        .top:last-child{
            color: limegreen;
        }
        .baidu:visited{
            color: magenta;
        }
        .class:focus{
            background-color: mediumturquoise;
        }
    </style>
</head>
<body>
    <div class="top">
        <p>独生子</p>
        <h1>独生子</h1>
    </div>
    
    <ul>
        <li>html</li>
        <li>css</li>
        <li>js</li>
    </ul>
    <a class="baidu"  href="#">百度</a>
    <input class="class" type="text">
</body>
</html>